import os
import sys
import ctypes
import ctypeslib


include_dir = os.environ["VXIPNPPATH"]+"WinNT\\include"
source_dir = os.path.dirname(os.path.abspath(__file__))
#print os.path.abspath(__file__)
source_file = os.path.join(include_dir,'niScope.h')
target_file = os.path.join(source_dir,'niScope.xml')

#cmd = 'gccxml -I"%s" "%s" -fxml="%s"'%(include_dir,source_file,target_file)
#cmd = 'gccxml --gccxml-compiler cl -preprocess -I "%s" -D WIN32 "%s" -fxml="%s"'%(include_dir,source_file,target_file)
#cmd = 'gccxml --help'
#print cmd
#os.system(cmd)
#os.execlp("gccxml","--gccxml-compiler cl --gccxml-cxxflags WIN32 "+include_dir+"niScope.h -fxml=%sniScope.xml"%source_dir)
#os.execvp("gccxml", ["--gccxml-compiler cl --gccxml-cxxflags WIN32 "+include_dir+"niScope.h -fxml=%sniScope.xml"%source_dir])
#f = open(include_dir+"niScope.h","r")
#print f.read()
#f.close()
#exec("dir")